Repository navigation
feat(studio): every human editor saves live; an item's unpublished AI changes can be dropped on its page (#36511, PR 3 of 3) - #36652
Conversation
Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
…udio-save-cancel # Conflicts: # ui/packages/app-shell/src/views/studio-design/DataPillar.formViewLayout-30057.test.tsx # ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx
Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
…ounce in its own module Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
…egister Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
… top bar Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
…ve for the extension The customize journey's extension step now asserts the new save: nothing is written before the top bar's Save, which writes the extension's draft into the pair and publishes that one item there, leaving no draft. Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
…ancel' into claude/issue-36511-studio-save-cancel-2
… pillar and saved by the top bar Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
…on are live at once Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
…d is live at once The Access pillar's matrix no longer autosaves a draft: Save writes it and publishes the set alone; Cancel puts back what the editor last read. The inspector footers, the access banners and the landing lead say Save, not Publish. Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
…ancel' into claude/issue-36511-studio-save-cancel-2
…h the top bar Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
… bar's Save The flow's saved badge retires with its autosave; a Save re-reads the flow's verdict. Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
…, read clean Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
…udio-save-cancel-2 # Conflicts: # ui/packages/app-shell/src/views/studio-design/DataPillar.pairActions-30088.test.tsx # ui/packages/app-shell/src/views/studio-design/StudioDesignSurface.tsx
Claude-Session: https://claude.ai/code/session_01ADHkmPsv99YG2tCHoSe8Nb Co-authored-by: Claude <noreply@anthropic.com>
…udio-save-cancel-3
… changes can be dropped on its page - The Access pillar's record-sharing overview drops its own Save: the top bar's Save writes each changed object's draft and publishes it; Cancel puts the dials back; a refused object keeps its edit and is named. - New object and new permission set are published as they are created, like a new flow; their dialogs, and the new flow's, say Create. - An object or a flow holding the AI assistant's unpublished draft says Save makes it live too, and offers to discard that one item's draft. - The field layout's Save and Cancel are pinned. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbWaN9FFV8GYdeZHvuB
…udio-save-cancel-3 # Conflicts: # .changeset/36511-studio-save-cancel-2.md # ui/packages/app-shell/src/views/studio-design/AutomationsPillar.saveCancel-36511.test.tsx
… in the edited suites check:test-source-alias asks every edited test file that reaches a lazy @objectstack/lint or @objectstack/formula import to pay that load during collection. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbWaN9FFV8GYdeZHvuB
|
DELIBERATE CORRECTION. This is a correction, not a filename collision. The note corrected is
The base sentence is no longer true. Hooks and flows moved to Save in #36634, and permission sets move in this PR. Restoring it from the base would publish that false sentence in the release notes. No other pending changeset is changed. Generated by Claude Code |
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj Contract reviewServed-tier: Diff base: ① Derived judgments
② Semver level
DELIBERATE CORRECTION confirmed: no — this record is FAIL, so it confirms nothing at this head. The sentence itself is judged true, and that judgment stands for a later head that leaves the sentence unchanged. Note corrected:
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: FAIL |
… controlled-by-parent prerequisite A Save walks the changed rows one by one, each published as it is saved. When a later row answered 409 DESTRUCTIVE_CHANGE, the Save opened the prerequisite dialog without reading back the rows it had already published, so they still showed as unsaved and the top bar's Cancel put their dials back to a value the server no longer held. The page now reads the rows back before it asks, keeping only the unsaved rows' edits. A new suite pins that, the confirm saving the remaining row alone, and the partial refusal: the refused row keeps its edit and is named, the other row is live, and the draft the Save wrote is taken back. Three comments that still described a draft-only save are brought up to date. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JQwxbWaN9FFV8GYdeZHvuB
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj Contract reviewServed-tier: Round 2: one commit on top of the round-1 head, ① Derived judgments
② Semver level
DELIBERATE CORRECTION confirmed: yes —
③ Boundary flags
④ Design judgment
Implemented-by: VERDICT: PASS |
|
repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj 维护者速读「人改完点保存、立刻生效」这件事的最后一步:权限集、对象访问总览、字段布局也改成右上角「取消 / 保存」,保存即生效;新建对象、流程、权限集时按钮写「创建」,建好就生效。 席位核对 — ACCEPT (L1) · repo:objectstack#1 · head
|
Requested by Warren · project thread
Fixes #36511
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
PR 3 of 3 for the card. PR 1 (#36597) moved an object's fields, validations, actions and settings to the Studio top-bar Cancel/Save; PR 2 (#36634) moved hooks, an installed app's added actions, and flows. This PR finishes the list:
PermissionMatrixEditor, inside Studio's Access pillar). Grants stay on the page until Save; Save writes the draft and publishes that one set at its package. A refused publish keeps the grant unsaved, says why, and takes back the draft it wrote. The full-metadata item page keeps its own buttons, as the card says.PackageOwdOverviewPanel). Its own "Save" button is gone; its rows register with the top-bar Save. Each changed object is saved as a draft and published at once. The controlled-by-parent prerequisite confirm still applies. Rows the server refuses stay edited and are named in the refusal; the rest are saved. When a later row asks the prerequisite, the rows already published are read back first, so none shows as unsaved and Cancel never restores a value the server no longer holds.engine.studio.createLive). Every other create dialog still writes a draft and still says "Save as draft".CreateItemDialog.oneLabel-11787pins which is which.DELETE /meta/:type/:name?state=draft&package=), never the package's batch discard. It asks first if the page has unsaved edits. The page goes back to the live version, and the Changes count re-reads the ledger, so it drops by that item. A draft a person wrote draws neither the line nor the button.Why
The maintainer ruled on 2026-11-22 that a human edit is saved and confirmed one item at a time. Drafts plus the batch publish stay for the AI. This PR moves the last human editors off the draft autosave and adds the card's item 6.
Acceptance
DataPillar.saveCancel-36511› an edit sends nothing until Save; Save writes the draft, then publishesStudioDesignSurface.saveBar-36511,studioSaveBar.partialSave-36511› is drawn only while a buffer is dirtystudioSaveBar.partialSave-36511› sends every dirty buffer in order;DataPillar.saveCancel-36511DataPillar.layoutSaveCancel-36511(2 tests)DataPillar.saveCancel-36511,ObjectHooksPanel.saveCancel-36511,PermissionMatrixEditor.studioSave-36511,PackageOwdOverviewPanel*,StudioDesignSurface.saveBar-36511› with no draft pendingAutomationsPillar.saveCancel-36511› the switch is live at once; a new flow is published as it is createdDataPillar.saveCancel-36511› removing a published field asks at Save;DataPillar.destructiveChange-34931DataPillar.saveCancel-36511› an edit that cannot be sent yet holds the whole Save and names what it needs; a refused publish keeps the edits unsavedDataPillar.aiDraftDiscard-36511(4 tests),AutomationsPillar.saveCancel-36511› flow AI block (2 tests)/customizationsDataPillar.baseObjectExtension-28575,DataPillar.pairActions-30088(writes the.custompair, then publishes there)StudioDesignSurface.draftVersionConflict-11773A person and the AI edit the same item at once. Neither side's change is dropped silently:
If-Match, orIf-None-Match: *when the page read no draft). If the AI wrote in between, the server refuses with a version conflict, and the existing draft-conflict dialog opens.StudioDesignSurface.draftVersionConflict-11773pins the refusal and both choices (the "two editors", "reload" and "overwrite" cases).Editors changed in this PR
metadata-admin/PermissionMatrixEditor.tsx: permission sets in Studio.studio-design/PackageOwdOverviewPanel.tsx: org-wide default overview.studio-design/StudioDesignSurface.tsx: object / flow / permission creates; the object and flow AI notice and discard.studio-design/StudioAiDraftNotice.tsx: the flow page's notice line.Tests added, rewritten or retired
Added:
DataPillar.aiDraftDiscard-36511DataPillar.layoutSaveCancel-36511PermissionMatrixEditor.studioSave-36511PackageOwdOverviewPanel.partialSave-36511: a refused row keeps its edit and is named while the other goes live, with the draft taken back; the controlled-by-parent prerequisite asked after an earlier row went liveAutomationsPillar.saveCancel-36511: the flow AI blockRewritten:
CreateItemDialog.oneLabel-11787. The three live creates must say Create; every other dialog must say Save as draft. Two CONTROL tests are included.PackageOwdOverviewPanel*suites. "owd-save" becomes the top-barstudio-save, and the fake clients gainpublish/reset.layersUnsaved-11799: its FRESH layers count goes from 0 to 1, the publish.sharedSelect-11865andrefusalClearsOnRevert-26846: a "disabled Save" now reads as "no Save drawn".StudioDesignSurface.changesCount-11787now drives Create app, which still writes a draft. A permission set no longer leaves one.StudioDesignSurface.draftVersionConflict-11773: it asserts the publish, and its save pins now readIf-None-Match: *three times.StudioDesignSurface.accessCreateTaken-26836andaccessGuard: the client gainspublish, and the create is asserted to publish.Label-only (Save as draft → Create):
CreateItemDialog.storedName-11792createObjectOwdflowPresets-11861flowStatusTruth-11779heldDataCreate-26845newFlowTrigger-11788sharedSelect-11865createTaken-26917PermissionMatrixEditor.recordScope-26187andsaveSurface-12725: the Studio save harnessRetired: none.
Verification
Rework at head
a4ee300c4(contract review 7096256689). Two things changed: the OWD prerequisite path, and three comments.Run at head
f9e6bada7(main merged atf590f3eb3):Permission-set work after the merge from main: a file-by-file check confirmed it is all still there.
PermissionMatrixEditor.tsx+97/-7studioSave-36511+201recordScope-26187+15/-7saveSurface-12725+10/-3accessPairCopy-29674+3StudioDesignSurface.tsx,en.ts,zh.ts), every permission line the split took out is back.Acceptance notes
draftChanges[].by). Hooks, actions and permission sets do not read it, so they show no AI line. Their draft still opens and is saved live as the AI's version plus the person's edit. Adding that read is a separate change if wanted.main(1371428) also carries one changeset wording edit..changeset/36511-studio-save-cancel.mdnow says permission sets moved to Save in a later change.DataPillar.panelHold-27629failed once in an earlier full local run of the studio-design tests. It passes when run alone, and it passed in the final full run above. It looks like a timing flake under load, in code this PR does not touch.Human Minimum
packages/specholds no runtime logic. (Not touched.)pnpm lintpasses.main, one pull request.packages/spectouched: n/a.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01JQwxbWaN9FFV8GYdeZHvuB